package Alex.applogic2;

import Alex.applogic.FilmHelper;
import Alex.model.Film;

public class FilmHelper2 extends DriverBasedHelper implements FilmHelper {

  public FilmHelper2(ApplicationManager2 manager) {
    super(manager.getWebDriver());
  }

  @Override
  public void create(Film film) {
    pages.internalPage.ensurePageLoaded()
    	.clickAddMovieButton();
    pages.addMoviePage.ensurePageLoaded()
    	.setTitle(film.getTitle())
    	.setAkaField(film.getAka())
    	.setYear(film.getYear())
    	.setDuration(film.getDuration())
    	.setRating(film.getRating())
    	.clickSaveButton();
    pages.editMoviePage.ensurePageLoaded()
    	.clickHomeLink();
  }

  @Override
  public void delete(Film film) {
    // TODO Auto-generated method stub

  }


}
